/*
	练习1.21 对象记录,记录多条销售记录
*/
#include<iostream>
#include"../include/Sales_Item.h"

int main(){
	Sales_item currItem,valItem;
	int Count=0;
	if (std::cin >> currItem) {
		while(std::cin >> valItem) {
			if (currItem.isbn() == valItem.isbn()){
				++Count;
			} else {
				std::cout << currItem.isbn() << " has " << Count << " Recode " << std::endl;
				currItem = valItem;
				Count = 0;
			}
		}
	}		
	std::cout << currItem.isbn() << " has " << Count << " Recode " << std::endl;
	return 0;
}